from django.db import models


# Create your models here.

class Users(models.Model):
    account = models.CharField(max_length=10, unique=True, blank=False, null=False)  # 账户
    belongs = models.CharField(max_length=10, unique=True, blank=False, null=False)  # 归属人
    password = models.CharField(max_length=100, default='123456789', blank=False, null=False)  # 密码
    add_date = models.DateTimeField(blank=False, null=False)  # 录入时间
    status = models.IntegerField(default=0)  # 当前状态。0：使用中，1：失效
    auth = models.IntegerField(default=0)  # 权限。0：最低，1：管理员


class Token(models.Model):
    account = models.CharField(max_length=10, unique=True)  # 账户
    token = models.CharField(max_length=200)  # Token
